From 2707b54e9bf13dad99d2467bfecd6dbfac475e41 Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Mon, 17 Dec 2007 09:33:52 -0700 Subject: [PATCH] [IA64] xenoprof: fix xenoprof_shared_gmfn() fix panic after xenoprof shutdown as follows. (XEN) Xen BUG at mm.c:1265 (XEN) FIXME: implement ia64 dump_execution_state() (XEN) (XEN) **************************************** (XEN) Panic on CPU 0: (XEN) Xen BUG at mm.c:1265 (XEN) *************************************** The c/s 14624:64ab7d443549 changed the p2m table semantics so that xenoprof_shared_gmfn() also needs catch it up. Signed-off-by: Isaku Yamahata --- xen/include/asm-ia64/xenoprof.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xen/include/asm-ia64/xenoprof.h b/xen/include/asm-ia64/xenoprof.h index 1d917532b5..f5ac2a6f5d 100644 --- a/xen/include/asm-ia64/xenoprof.h +++ b/xen/include/asm-ia64/xenoprof.h @@ -48,8 +48,13 @@ static inline void xenoprof_backtrace( /* To be implemented */ return; } -#define xenoprof_shared_gmfn(d, gmaddr, maddr) \ - assign_domain_page((d), (gmaddr), (maddr)); +#define xenoprof_shared_gmfn(d, gmaddr, maddr) \ +do { \ + unsigned long ret; \ + ret = create_grant_host_mapping((gmaddr), \ + (maddr) >> PAGE_SHIFT, 0, 0); \ + BUG_ON(ret != GNTST_okay); \ +} while (0) static inline int ring(const struct pt_regs* regs) -- 2.30.2